package Model;

/**
 * Holds data for the store.
 * @author Emily
 *
 */

public class Store {
	private int food;
	private int energy;
	private int ore;
	private int mules;
	
	/**
	 * Constructor for the store, initializes the initial resource amounts.
	 */
	public Store()
	{
		//Initializing beginner settings
		food = 16;
		energy = 16;
		ore = 0;
		mules = 25;
	}
	
	/**
	 * Getter for amount of food
	 * @return int food
	 */
	public int getFood() {
		return food;
	}
	
	/**
	 * boolean indicating if store has mules to sell
	 * @return boolean
	 */
	public boolean sufficientMules() {
		if (mules > 0) {
			return true;
		}
		
		else {
			return false;
		}
	}

	/**
	 * Setter for amount of food
	 * @param int food
	 */
	public void setFood(int food) {
		this.food = food;
	}
	
	/** 
	 * increment food field
	 * @param quantity integer food 
	 */
	public void incrementFood(int quantity) {
		food = food + quantity;
	}

	/**
	 * Getter for amount of energy
	 * @return int energy
	 */
	public int getEnergy() {
		return energy;
	}

	/**
	 * Setter for amount of energy
	 * @param int energy
	 */
	public void setEnergy(int energy) {
		this.energy = energy;
	}
	
	/** 
	 * increment energy field
	 * @param quantity integer food 
	 */
	public void incrementEnergy(int quantity) {
		energy = energy + quantity;
	}

	/**
	 * Setter for amount of ore
	 * @return int ore
	 */
	public int getOre() {
		return ore;
	}

	/**
	 * Setter for amount of ore
	 * @param int ore
	 */
	public void setOre(int ore) {
		this.ore = ore;
	}
	
	/** 
	 * increment ore field
	 * @param quantity integer ore 
	 */
	public void incrementOre(int quantity) {
		ore = ore + quantity;
	}
	
	/**
	 * Setter for amount of ore
	 * @return int mules
	 */
	public int getMules() {
		return mules;
	}

	/**
	 * Setter for amount of ore
	 * @param int ore
	 */
	public void setMules(int mules) {
		this.mules = mules;
	}
	
	/** 
	 * increment mule field by 1
	 * 
	 */
	public void incrementMules() {
		mules = mules + 1;
	}
	
	/**
	 * decrement mules field by 1
	 */
	public void decrementMules() {
		mules = mules - 1;
	}

}
